function [obj2] = calc_Yagg(obj)
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	% This function takes an object XXX, and returns an object where the things
	% are aggregated across locations.
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%%%% Inputs:
	% obj:							object
	%	.consumerAdoptions:				T x K x dim3
	%	.providerAdoptions:				T x K x dim3
	%	.providerExits:					T x K x dim3
	%	.laggedConsumersOrig:				T x K x dim3
	%	.laggedConsumersDest:				T x K x dim3 --> not used
	%	.laggedProviders:					T x K x dim3
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%%%%% Outputs:
	% obj2:							object
	%	.consumerAdoptions:				T x dim3
	%	.providerAdoptions:				T x dim3
	%	.providerExits:					T x dim3
	%	.laggedConsumers:					T x dim3
	%	.laggedProviders:					T x dim3
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	
	[T,K,dim3] = size(obj.consumerAdoptions);
	
	obj2.consumerAdoptions = reshape(sum(obj.consumerAdoptions, 2),   [T dim3]); % T x dim3
	obj2.providerAdoptions  = reshape(sum(obj.providerAdoptions, 2),    [T dim3]); % T x dim3
	obj2.providerExits      = reshape(sum(obj.providerExits, 2),        [T dim3]); % T x dim3
	obj2.laggedConsumers   = reshape(sum(obj.laggedConsumersOrig, 2), [T dim3]); % T x dim3
	obj2.laggedProviders    = reshape(sum(obj.laggedProviders, 2),      [T dim3]); % T x dim3
end
